From: Jonas Dreßler Date: Thu, 25 Feb 2021 10:57:22 +0000 (+0100) Subject: workspace: Don't do checks in animateAllocation() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~152 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ec4b9b8894ceb3a81a25245584f1ae236c6dbf2e;p=gnome-shell.git workspace: Don't do checks in animateAllocation() These checks aren't needed since Clutter should enforce this for us already and skip the implicit transition when possible. This gets our time spent in vfunc_allocate() down to 2.0 ms with 20 windows Part-of: --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 3337b2ed0..e78630df4 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -382,13 +382,6 @@ var UnalignedLayoutStrategy = class extends LayoutStrategy { }; function animateAllocation(actor, box) { - if (actor.allocation.equal(box) || - actor.allocation.get_width() === 0 || - actor.allocation.get_height() === 0) { - actor.allocate(box); - return null; - } - actor.save_easing_state(); actor.set_easing_mode(Clutter.AnimationMode.EASE_OUT_QUAD); actor.set_easing_duration(200);